package com.itheima.mp.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum UserStatus {

    NORMAL(1,"正常"),
    FROZEN(2,"冻结");

    @EnumValue   //对应是哪个字段的类型，匹配
//    @JsonValue   //标记设置返回的内容  返回1/2
    private final Integer value;
    @JsonValue   //标记设置返回的内容  返回正常或冻结
    private final String desc;

    UserStatus(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

}
